home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000093_icon-group-sender_Mon Oct 23 16:58:14 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9NNw0X05043
for icon-group-addresses; Mon, 23 Oct 2000 16:58:00 -0700 (MST)
Message-Id: <200010232358.e9NNw0X05043@baskerville.CS.Arizona.EDU>
Date: Mon, 23 Oct 2000 16:20:42 -0500
From: "Charles Hethcoat" <CHETHCOA@oss.oceaneering.com>
To: "Parvinder Kaur" <kaurp@cs.ucdavis.edu>
Cc: <icon-group@cs.arizona.edu>
Subject: Re: Icon beginner
Content-Disposition: inline
X-Guinevere: 1.0.13 ; Oceaneering Int'l
X-MIME-Autoconverted: from quoted-printable to 8bit by baskerville.CS.Arizona.EDU id e9NLJw300124
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 866
Not the only way, or the best way, but it works:
procedure main()
wsp := ' ' # a whitespace cset
s_in := "Pretty little maids all in a row."
s_out := ""
s_in ? {
while s_out ||:= tab(upto(wsp)) do
tab(many(wsp))
s_out ||:= tab(0)
}
write(s_in, "\n-->", s_out)
exit()
end
It should give:
Pretty little maids all in a row.
-->Prettylittlemaidsallinarow.
You can also change the cset to recognize tabs and such:
wsp := ' \t'
Charles Hethcoat
>>> Parvinder Kaur <kaurp@cs.ucdavis.edu> 00-10-23 1:56:42 PM >>>
Hi,
I'm just learning icon and I'm stumped with a particular problem. I'm
suppose to delete all occurrences of a space from a sentence, i.e. "Hi
there" should become "Hithere". Any ideas of how I should approach this
problem. I tried using the built-in delete proc. but it wasn't working.
I'd appreciate any help, thanks!
-Cos